﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Windows.Forms;

namespace ZK.YHP_TransManage.Test
{
    public partial class 定时器测试 : Form
    {
        private System.Timers.Timer timer = new System.Timers.Timer(1000);
        public 定时器测试()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            timer.Elapsed += new System.Timers.ElapsedEventHandler(timer1EventProcessor);
            timer.AutoReset = false; //
            timer.Enabled = true;
            timer.Start();

        }

        private void timer1EventProcessor(object sender, ElapsedEventArgs e)
        {
            MessageBox.Show("123");
            timer.Start();
        }
    }
}
